<link rel="stylesheet" type="text/css" href="<?php echo base_url()."style.css"; ?>" />
<style type="text/css">
#warning
{
padding:10px;
margin-bottom:0px;
background-color:#E77471;
border-width:1px;
border-style: solid;
border-color:#A80000;
}
#success
{
padding:10px;
margin-bottom:0px;
background-color:#A8CBD4;
border-width:1px;
border-style: solid;
border-color:#04637A;
}
#headline 
{
font-weight:bold;
font-size:110%;
color:#e56506;
}


body
{
background-image: url(<?php echo base_url()."/images/white.gif"; ?>);
background-repeat: repeat-xy;
}

#grey
{
background-color: #E0E0E0;
}

.rightside
{
width:500px;
background-color: #E7EFEF;
border-style:solid;
border-width:1px;
border-color:#ff0000;
padding:10px 0 10px 20px;
align:center;
}
#admin
{
align:center;
}
</style>
<html>
<head>
<title>Admin</title>
	<meta charset="UTF-8" />


</head>
<body>
<!--search for the city first-->
					<?php	echo form_open('admin_search_prov'); ?>
							<?php if(strcmp($success,"")!=0) {?>
							<p id="success"><?php echo $success; ?></p>
							<?php }?>
							<?php if(strcmp($warning,"")!=0) {?>
							<p id="warning"><?php echo $warning; ?></p>
							<?php }?>

<center>
<table width="75%" align="center">	
	<tr>
		<td align="center">
			<div id="admin">
							<h2 id="font">Admin Panel - Lel-Ltd</h2>
							<a href="<?php echo base_url()."admin"; ?>">Back to Admin Home</a>
							<br />
							<br />
			</div>
		</td>
	</tr>
	<tr>
		<td>
				<table width="100%" align="center" style="border-width:1px; border-style: solid; border-color:#04637A; padding:20px 0 20px 0;">
					<tr>
						<td width="30%"></td>
						<td id="headline">Search Province/State<br><br></td>
						<td></td>
						<td width="30%"></td>
					</tr>
					<tr>
						<td width="30%"></td>
						<td width="20%">Province/State :</td>
						<td id="right" align=left><input name="search_province_state" type="text" value="<?php echo $search_province;?>" ></td>
						<td width="30%"></td>
					</tr>
					<tr>
						<td width="30%"></td>
						<td width="20%"><?php	echo form_submit('search_province', 'Search');	?>	</td>
						<td></td>
						<td width="30%"></td>
					</tr>
				</table>
				<table  width="100%" style="padding:20px 0 20px 0;">
					<?php					
						if(isset($search_province_list) && count($search_province_list))
						{
					?>
							<tr>
								<td width="50%"><?php if(count($search_province_list)==1) echo "1 province/ state was found.";else echo count($search_province_list)." provinces/states were found.";?> <br><br></td>
								<td width="20%"></td>
								<td width="5%"></td>
							</tr>
							<tr>
<!--							<td width="10%" align="center"><b>ID</b></td>		-->
								<td width="50%"><b>Province/State </b></td>
								<td width="20%"><b>Country</b></td>
								<td width="5%"><b>Delete</b></td>
							</tr>
					<?php 
							for($i=0;$i<count($search_province_list);$i++) 
							{
								if($i%2==1)
								{
					?>
								<tr>
					<?php   	}
								else 
								{
					?>								
								<tr id="grey">
					<?php 		}				?>
<!--								<td align="center"><?php echo $search_province_list[$i]['id']; ?></td>	-->
									<td><?php echo $search_province_list[$i]['province']; ?></td>
									<td><?php echo $search_province_list[$i]['country']; ?></td>
	<!--							<td><input type="hidden" name="hidden_province_id" value=<?php echo $search_province_list[$i]['id']; ?> /></td>
								<td><?php	echo form_submit('delete_province', 'Delete Province');	?>	</td>	-->
<td align="center"><img src="<?php echo base_url()."images/delete.png"; ?>" title="Delete this item" style="cursor:pointer" onclick="if(confirm('Are you sure you want to delete Province/State <?php echo $search_province_list[$i]['province']; ?> ?')) document.location = '<?php echo base_url()."admin_search_prov/delete_province/".$search_province_list[$i]['id']."/".$search_province_list[$i]['province']; ?>';"></td>
								</tr>
					<?php 
							}
						}
/*						
						else if(isset($search_province_list) && count($search_province_list)==0)
						{
							echo "No Province/State with \"".$search_province."\" was found.";
						}
*/
					?>
				</table>
		</td>
	</tr>
</table>
</center>

<?php			echo form_close(); ?>

</body>
</html>